<template>
  <div class="app-container">
  <div class="filter-container">
    </div>
  
    <el-table
      v-loading="listLoading"
      :data="list"
      element-loading-text="Loading"
      border
      fit
      highlight-current-row
    >
      
      <el-table-column label="Jump to Teacher_table" align="center" width="300" class-name="small-padding fixed-width">

          <el-button type="primary" size="mini" @click="teacher()" >
             Teacher_table
          </el-button>

      </el-table-column>

      <el-table-column label="Jump to Student_table" align="center" width="300" class-name="small-padding fixed-width">

          <el-button type="primary" size="mini" @click="student()">
             Student_table
          </el-button>
        
      </el-table-column>
      
    </el-table>
  </div>
</template>

<script>
import { getList } from '@/api/table'

export default {
  filters: {
    statusFilter(status) {
      const statusMap = {
        published: 'success',
        draft: 'gray',
        deleted: 'danger'
      }
      return statusMap[status]
    }
  },
  data() {
     return {
      list: [
      {
      
      }]
    }
  },
  created() {
    this.fetchData()
  },
  handleModifyStatus(row, status) {
      this.$message({
        message: '操作Success',
        type: 'success'
      })
      row.status = status
    },
    handleFilter() {
      this.listQuery.page = 1
      this.getList()
    },
    handleDelete(row, index) {
      this.$notify({
        title: 'Success',
        message: 'Delete Successfully',
        type: 'success',
        duration: 2000
      })
      this.list.splice(index, 1)
    },
    handleUpdate(row) {
      this.temp = Object.assign({}, row) // copy obj
      this.temp.timestamp = new Date(this.temp.timestamp)
      this.dialogStatus = 'update'
      this.dialogFormVisible = true
      this.$nextTick(() => {
        this.$refs['dataForm'].clearValidate()
      })
    },
  methods: {
    fetchData() {
    	var vm=this;
   		this.axios({
   		method:"GET",
   		url:'http://localhost:8080/course-web/internalDate/.jsonp?page=1&limit=100'
   		}).then(function(resp){
   		vm.list=resp.data
   		});
      },
      teacher() {
        this.$router.push("/example3/teacher")
      },
      student() {
        this.$router.push("/example2/student")
      },
  }
}
</script>
